{% extends "security/base.html" %}
{% from "security/_macros.html" import render_field_with_errors, render_field, render_submit %}
{% include "security/_messages.html" %}
{% block title %}登录{% endblock %}

{% block content %}
<div class="form-horizontal">
  <br>
  <h3 class="text-center">请登录</h3>
  <br>
  <form action="{{ url_for_security('login') }}" method="POST" name="login_user_form">
    {{ login_user_form.hidden_tag() }}
    {{ render_field_with_errors(login_user_form.email) }}
    {{ render_field_with_errors(login_user_form.password) }}
    {{ render_submit('登录', 'commit') }}
  </form>
  <br>
  <div class="text-center">
      <a class="btn btn-default" href="/login/douban/"><i class="fa fa-weixin"></i> 豆瓣</a>
      <a class="btn btn-default" href="/login/github/"><i class="fa fa-github"></i> GitHub</a>
  </div>
  <br>
  <div class="menu">
     <p class="left">没有账号？ <a href="{{ url_for_security('register') }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}">注册</a> <a class="right" href="{{ url_for_security('forgot_password') }}">忘记密码？</a></p>
   </div>
</div>
{% endblock %}
